package buco.jsonrpc;

import java.io.IOException;
import java.io.Writer;

import org.json.simple.*;

import buco.core.api.*;

public class CapabilityConverter implements JSONStreamAware {
	private Capability capability; 
	
	public CapabilityConverter(Capability capability) {
		this.capability = capability; 
	}
	
	@Override
	public void writeJSONString(Writer wr) throws IOException {
		if(capability instanceof ExportPackageCapability) {
			ExportPackageCapability epc = (ExportPackageCapability) capability; 
			new ExportPackageCapabilityConverter(epc).writeJSONString(wr); 
		}
	}

}
